package cn.ijero.waterfallflow;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

public abstract class BaseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        initViewBefore(savedInstanceState);
        setContentView(getContentLayoutId());

        initView();
        initViewListener();
        initObserver();
        initData();
    }

    /**
     * @return
     */
    protected abstract int getContentLayoutId();

    /**
     * @param savedInstanceState
     */
    protected abstract void initViewBefore(Bundle savedInstanceState);

    /**
     *
     */
    protected abstract void initView();

    /**
     *
     */
    protected abstract void initViewListener();

    /**
     *
     */
    protected abstract void initObserver();

    /**
     *
     */
    protected abstract void initData();

}
